//
//  Book.m
//  03-HomeWork
//
//  Created by 李昊林 on 16/7/6.
//  Copyright © 2016年 李昊林. All rights reserved.
//

#import "Book.h"

@implementation Book

- (id)initWithName: (NSString *)name
             Price: (int)price {
    _name = name;
    _price = price;
    return self;
}

+ (id)bookWithName: (NSString *)name
             Price: (int)price {
    Book *book = [[Book alloc] initWithName:name Price:price];
    return book;
}


- (void)addBookArray: (NSMutableArray *)bookArray
                Temp: (Book *)temp {
    [bookArray addObject:temp];
}

- (void)deleteBookArray: (NSMutableArray *)bookArray
                   Temp: (Book *)temp {
    [bookArray removeObject:temp];
}

@end
